<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>
<probiz:pageHeading pageHeadingKey="membershipDetail.title" />

<content tag="buttons">
	<probiz:iconBtn btnType="save" onclick="return fnDoSave(this);" />
    <probiz:iconBtn btnType="back" url="${ctxPath}/customer/membership.html"/>
</content>  

<probiz:showBindErrors bindPath="membership.*" />
<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="membershipDetail.title"/></span></li>
	</ul>
</div>
<form class="mainForm" method="post" action="${ctxPath}/customer/membership.html" id="membership"  onsubmit="return validateMembership(this)">
<input type="hidden" name="membershipId" value="${membership.membershipId}"/> 
<div class="modify">
    <table  width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
		<tr>
			<th colspan="2" class="title"><h4><fmt:message key="membership.group.basic"/></h4></th>
		</tr>
	    <tr>
	        <th class="label_width_1">
	            <StoreAdmin:label key="membership.membershipName"/>
	        </th>
	        <td>
	        	<spring:bind path="membership.membershipName">
	            	<input type="text" name="${status.expression}" id="${status.expression}" 
  	            			value="${status.value}" class="inputtxt" style="width:350px" maxLength="64"/>
	            	<span class="fieldError">${status.errorMessage}</span>
	            </spring:bind>
	        </td>
	    </tr>
	    <tr>
	        <th>
	            <StoreAdmin:label key="membership.membershipLevel"/>
	        </th>
	        <td>
	        	<c:choose>
	        		<c:when test="${(not empty membership.membershipId) and membership.baseMembership}">
	        			${membership.membershipLevel} (<fmt:message key="membership.membershipLevel.default.tip"/>)
	        		</c:when>
	        		<c:otherwise>
			        	<input type="text" class="inputtxt" style="width:100px" name="membershipLevel" id="membershipLevel" value="<c:out value="${membership.membershipLevel}"/>" />
	        		</c:otherwise>
	        	</c:choose>
	        	
	        </td>
	    </tr>
	    <tr>
	        <th valign="top">
	            <StoreAdmin:label key="membership.membershipDetail"/>
	        </th>
	        <td>
	        	<spring:bind path="membership.membershipDetail">
    		       	<textarea name="${status.expression}" id="${status.expression}" 
  	            			class="textareatxt" style="width:350px" rows="6">${status.value}</textarea>
        	    	<span class="fieldError">${status.errorMessage}</span>
	            </spring:bind>
	        </td>
	    </tr>
	    
	    <tr>
			<th colspan="2" class="title"><h4><fmt:message key="membership.group.intro"/></h4></th>
		</tr>
		<tr>
	        <th>
	            <StoreAdmin:label key="membership.upgradeShopPoint"/>
	        </th>
	        

	        <td>
	        	<c:choose>
	        		<c:when test="${(not empty membership.membershipId) and membership.baseMembership}">
	        			${membership.upgradeShopPoint} (<fmt:message key="membership.upgradeShopPoint.default.tip"/>)
	        		</c:when>
	        		<c:otherwise>
			        	<input type="text" class="inputtxt" style="width:100px" name="upgradeShopPoint" id="upgradeShopPoint" value="<c:out value="${membership.upgradeShopPoint}"/>" />
	        		</c:otherwise>
	        	</c:choose>
	        </td>
	    </tr>
		<tr>
	        <th valign="top">
	            <StoreAdmin:label key="membership.upgradeTips"/>
	        </th>
	        <td>
	        	<spring:bind path="membership.upgradeTips">
    		       	<textarea name="${status.expression}" id="${status.expression}" 
  	            			class="textareatxt" style="width:350px" rows="6">${status.value}</textarea>
        	    	<span class="fieldError">${status.errorMessage}</span>
	            </spring:bind>
	        </td>
	    </tr>
	    
	</table>
</div>
</form>

<v:javascript formName="membership" staticJavascript="false"></v:javascript>

